require 'watir'
include Watir
require 'test/unit'
class TC_blogsFrontEnd < Test::Unit::TestCase
  	def test_60_CreateBlogWithURLThatHasSpaces_Blogs

    $ie.goto($UniVar)
#No Prerequisites Required

#Test Specifics
	$ie.goto($UniVar + '/controlpanel/BlogAdmin/sectionedit.aspx')
	$ie.text_field(:id, /ctl00_ctl00_TaskRegion_SectionDetails1_SectionDetails1_SectionName/).set('Watir Test URL with Spaces')
	$ie.text_field(:id, /ctl00_ctl00_TaskRegion_SectionDetails1_SectionDetails1_AppKey/).set('this location has spaces')		
	$ie.link(:text, 'Save').click
	assert($ie.contains_text('this_location_has_spaces'))
  
#Delete Blog    
        $ie.goto($UniVar + '/controlpanel/BlogAdmin/Blogs.aspx')
        $ie.wait()
        $ie.link(:text, 'Delete').click_no_wait
        hwnd = $ie.enabled_popup(20)
          if(hwnd)
            w = WinClicker.new
            w.clickWindowsButton_hwnd(hwnd, "OK")
          end     
end
end